-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: fix grpc client creation slightly #73
Conversation
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
controllers/k8sgpt_controller.go
Outdated
if os.Getenv("LOCAL_MODE") != "" { | ||
address = "localhost:8080" | ||
} else { | ||
address = os.Getenv("K8SGPT_API_HOST") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if this variable is not set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should the new slug be:
address = fmt.Sprintf("http://%s.%s:8080/analyze", deployment.Name, deployment.Namespace)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, or something like this :
address = fmt.Sprintf("http://%s.%s:8080/analyze", "k8sgpt", deployment.Namespace)
What do you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that the right API for the grpc impl? I thought usually it would be v1/analyze
etc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No good spot ! Let me check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only need something like this : address = fmt.Sprintf("%s.%s:8080", "k8sgpt", deployment.Namespace)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Closes #
π Description
β Checks
βΉ Additional Information